package com.tengju.user.domain.shared;

public enum DomainExceptionCode {
    ID_SHOULD_BE_POSITIVE("ID必须大于0"),
    DATA_NOT_FOUND("找不到%s数据 ID:%s"),
    INVALID_DATA("数据异常 %s"),
    PRICE_SHOULD_BE_POSITIVE("价格不能小于0"),
    CAST_OBJECT_TO_JSON_FAIL("Cast object to json fail"),
    NOT_SUPPORT_OPERATION("不支持该操作 %s"),
    SYS_PARAMS_NULL("请求失败，必输项为空,%s"),
    SYS_PARAMS_ERROR("请求失败，参数异常,%s"),
    NOT_REGIST_ERROR("未注册"),
    PWD_ERROR("用户名不存在或密码错误"),
    ES_ERROR("es错误"),
    SELF_NOT_SUPPORT_PERSONAL_ACCOUNT("自认证企业不支持开立个人账户")
    ;

    private String message;

    DomainExceptionCode(String message) {
        this.message = message;
    }

    public String getMessage(Object... param) {
        return String.format(message, param);
    }
}
